<%-- 
    Document   : addsoaentry
    Created on : May 21, 2012, 10:02:31 AM
    Author     : Jayson Kiong
--%>

<%@page import="java.util.ArrayList"%>
<%@page import="Model.Soa"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta http-equiv="Pragma" content="no-cache">
        <meta http-equiv="Cache-Control" content="no-cache">
        <meta http-equiv="Expires" content="Sat, 01 Dec 2001 00:00:00 GMT">
        <link rel = "stylesheet" type = "text/css" href = "quicklendstyle.css"/>
        <link rel="stylesheet" type="text/css" href="css/jquery.datepick.css" id="theme">
        <link type="text/css" href="css/ui-lightness/jquery-ui-1.8.19.custom.css" rel="stylesheet" />
	<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="js/jquery-ui-1.8.19.custom.min.js"></script>
        <script type="text/javascript" src="js/jquery.datepick.js"></script>
        <script type="text/javascript" src="quicklendjs.js"></script>
        <script src="gen_validatorv4.js" type="text/javascript"></script>
        
        <script type="text/javascript">
            $(function(){
             $('#soaduedate').datepick();
             
              });
        </script>
        
        <title>Add SOA Entry</title>
    </head>
    <body>
        <%
        Soa soa = new Soa();
        ArrayList soaar = (ArrayList)session.getAttribute("soa");
        int soaarsize = 0, arctr=0;
        if(soaar!=null){
            soa = (Soa)soaar.get(0);
            soaarsize = soaar.size();
        }
        
        %>
        <div id="contenttitle" style="position: absolute; top:13px; left:25px;">
            Add SOA Entry
        </div>
        <form id="addsoaform" action="SaveSoaServlet" method="GET">
            <table id="addsoacontent"style="font-family:segoe ui; font-size:12px;position:absolute; top:70px; left:30px; filter:alpha(opacity=100)">
            
                <tr>
                    <td>Due Date:</td><td><input id="soaduedate" type="text" name="soaduedate" value="" ><div id='addsoaform_soaduedate_errorloc' style="color:#FF0000"></div></td>
                </tr>
                <tr>
                    <td>Collection:</td><td><input type="text" name="collection" value=""><div id='addsoaform_collection_errorloc' style="color:#FF0000"></div></td>
                </tr>
                <tr>
                    <td><input type="hidden" name="clientid" value="<%=soa.getiClientid()%>"</td>
                </tr>
                
                <tr>
                   <td><input type="hidden" name="startdate" value="<%=soa.getStrStartdate()%>"></td>
                </tr>
                <tr>
                    <td><input type="hidden" name="monthly" value="<%=soa.getfMonthly()%>"></td>
                </tr>
                <tr>
                    <td><input type="hidden" name="amountdue" value="<%=soa.getfAmountdue()%>"></td>
                </tr>
                <tr>
                    <td><input type="hidden" name="comakerpay" value="<%=soa.getfComakerpay()%>"></td>
                </tr>
                <tr>
                    <td><input type="hidden" name="fc" value="<%=soa.getfFc()%>"></td>
                </tr>
                <tr>
                    <td><input type="hidden" name="cashpay" value="<%=soa.getfCashpay()%>"></td>
                </tr>
                <tr>
                    <td><input type="hidden" name="refund" value="<%=soa.getfRefund()%>"></td>
                </tr>
                <tr>
                    <td><input type="hidden" name="balance" value="<%=soa.getfBalance()%>"></td>
                </tr>
                <tr>
                    <td><input type="hidden" name="fcpercent" value="<%=soa.getfPercent()%>"></td>
                </tr>
                <tr>
                    <td><input type="hidden" name="loanno" value="<%=request.getParameter("loanno")%>"></td>
                </tr>
                
                <tr>
                    <td></br></td>
                </tr>
                <tr>
                    <td>*All fields are required</td>
                </tr>
                
                    
            </table>
             <div id="edituserfunction" style="position:absolute;top:550px;left:450px;">
                <input type="image" src="images/saveimage.png" size="13" style="position:absolute; left:0px"/>
                <a href="#" class="precompcancelbtn" name="precompcancelbtn"  size="13" style="position:absolute; left:170px"/></a>     
            </div>
        </form>
    </body>
     <script type="text/javascript">
         var frmvalidator  = new Validator("addsoaform");
         frmvalidator.addValidation("soaduedate","req","Please enter the Due Date");
         frmvalidator.addValidation("collection","num","Invalid Collection");
         frmvalidator.addValidation("collection","req","Please enter the collection");
         frmvalidator.EnableOnPageErrorDisplay();
         frmvalidator.EnableMsgsTogether();
    </script>
</html>
